import {FC} from "react";
import {renderComponent} from "./ComponentFactory";
import {ControllerMappingInterface} from "../../../types/interface/form.control.interface";


interface TranslatePropsInterface {
    property: ControllerMappingInterface[keyof ControllerMappingInterface],
    onClick?: () => void
}

const TranslateComponent: FC<TranslatePropsInterface> = ({property ,onClick}) => {
    return (
        <div onClick={onClick}>
            {renderComponent(property)}
        </div>
    )
};

export default TranslateComponent